package com.wngbms.algo;

public class _06_LRUBaseLinkedList<T> {

    private final static Integer DEFAULT_CAPACITY = 10;
    private SNode<T> headNode;
    private Integer length;
    private Integer capacity;

    public _06_LRUBaseLinkedList() {
        this(DEFAULT_CAPACITY);
    }

    public _06_LRUBaseLinkedList(int capacity) {
        this.capacity = capacity;
        this.headNode = new SNode<>();
        this.length = 0;
    }

    public void add(T data) {
        if (data == null) {
            throw new IllegalArgumentException("");
        }

        SNode<T> node = new SNode<>(data, headNode.next);
        this.headNode = node;
        length++;
    }

    public static class SNode<T> {
        T element;
        SNode next;

        public SNode() {
        }

        public SNode(T element) {
            this.element = element;
        }

        public SNode(T element, SNode next) {
            this.element = element;
            this.next = next;
        }
    }

    public static void main(String[] args) {

    }

}
